<%--
  Created by IntelliJ IDEA.
  User: HUAWEI
  Date: 2021/5/30
  Time: 20:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="/spring/static/js/jquery-3.5.1.min.js" type="text/javascript"></script>
</head>
<body>
    <%--madeth1--%>
    <%--<form action="/spring/fc/madeth1">
        name:<input type="text" name="name">
        age:<input type="text" name="age">
        <input type="submit" value="提交">
    </form>--%>

    <%--madeth2--%>
   <%-- <form action="/spring/fc/madeth2">
        name:<input type="text">
        age:<input type="text">
        <input type="submit" value="提交">
    </form>--%>

    <%--madeth3--%>
    <%-- <form action="/spring/fc/madeth3">
         name:<input type="text">
         age:<input type="text">
         <input type="submit" value="提交">
     </form>--%>

    <%--madeth4--%>
    <%--<a href="/spring/fc/url/qqq,12">通过URL获取</a>--%>

    <%--madeth5--%>
    <%--<form action="/spring/fc/madeth5">
        name:<input type="text">
        age:<input type="text">
        <input type="submit" value="提交">
    </form>--%>


   <%--<form action="/spring/rests/date">
        date:<input type="date" name="date">
        <input type="submit" value="date提交">
    </form>--%>


 <script type="text/javascript">
     <%--   $.ajax({
         url:"/spring/rests/a",
         type:"POST",
         data:{"name":"qqq","age":"12"},
         success:function(data){
             if(data=='ok'){
                 console.log("传值成功");
             }

         }
     })

     function a(){
         $.ajax({
             url: "/spring/rc/a",
             type: "POST",
             data:{"name":"xxx","age":"12"},
             success:function(data){
                 if(data=='ok'){
                     console.log("成功");
                 }

             }
         })
     }--%>
            function b() {
                $.ajax({
                    url: "/spring/rests/date",
                    type: "POST",
                    data: {"date":"2020-02-02"},
                    success: function (data) {
                        console.log(data);
                    }
                })
            }
    </script>

<%--<button type="submit" onclick="a()">异步提交</button>--%>
    <button type="submit" onclick="b()">date传参</button>
</body>
</html>
